function getPersonWithPhone (person) {
    if (person.sex==1){
        person.sex='女'
    }
    if (person.sex==0){
        person.sex='男'
    }
    switch (person.apartment) {
        case 'A1': {
            person.apartment='北苑一号宿舍楼'
            break
        }
        case 'A2': {
            person.apartment='北苑二号宿舍楼'
            break
        }
        case 'A3': {
            person.apartment='北苑三号宿舍楼'
            break
        }
        case 'A4': {
            person.apartment='北苑四号宿舍楼'
            break
        }
        case 'A5': {
            person.apartment='北苑五号宿舍楼'
            break
        }
        case 'A6': {
            person.apartment='北苑六号宿舍楼'
            break
        }
        case 'A7': {
            person.apartment='北苑七号宿舍楼'
            break
        }
        case 'A8': {
            person.apartment='北苑八号宿舍楼'
            break
        }
        case 'A9': {
            person.apartment='北苑九号宿舍楼'
            break
        }
        case 'B1': {
            person.apartment='北苑一号宿舍楼'
            break
        }
        case 'B2': {
            person.apartment='北苑二号宿舍楼'
            break
        }
        case 'B3': {
            person.apartment='北苑三号宿舍楼'
            break
        }
        case 'B4': {
            person.apartment='北苑四号宿舍楼'
        }
        case 'B5': {
            person.apartment='北苑五号宿舍楼'
            break
        }
        case 'B6': {
            person.apartment='北苑六号宿舍楼'
            break
        }
        case 'B7': {
            person.apartment='北苑七号宿舍楼'
            break
        }
        case 'B8': {
            person.apartment='北苑八号宿舍楼'
            break
        }
        case 'B9': {
            person.apartment='北苑九号宿舍楼'
            break
        }
        case 'B10': {
            person.apartment='北苑十号宿舍楼'
            break
        }
        case 'B12': {
            person.apartment='北苑十二号宿舍楼'
            break
        }
        case 'C1': {
            person.apartment='教职公寓'
            break
        }
        case 'D1': {
            person.apartment='校外'
            break
        }
    }
    switch (person.role){
        case 0:person.role='外来人员';break;
        case 1:person.role='本科生';break;
        case 2:person.role='研究生';break;
        case 3:person.role='教工';break;
        case 4:person.role='职工';break;
    }
    // if (person.phone.length==11){
    //     person.phone= person.phone.substr(0, 3) + '****' +  person.phone.substr( person.phone.length - 4);
    // }
    return person
}
export default getPersonWithPhone
